﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib tagdir="/WEB-INF/tags/template" prefix="t" %>
<%@ taglib tagdir="/WEB-INF/tags/componentes" prefix="comp" %>

<t:template>
	<jsp:body>
		<div class="contact_form">			
				<div class="form_subtitle">Especie</div>
					
					<comp:messages />
	                 
					<table class="table" style="width:100%;">
						<thead>
							<tr>
								<th class="title">Código</th>
								<th class="title">Descrição</th>								
								<th class="title"></th>
								<th class="title"></th>
							</tr>
						</thead>
					<tbody>
						<c:forEach var="item" items="${listaEspecies}">
							<tr>
								<td>${item.pkCodigo}</td>
								<td>${item.dsDescricao}</td>								
								<td><a href="${pageContext.request.contextPath}/especie/update?especie.pkCodigo=${item.pkCodigo}" class="button">Alterar</a></td> 

								<td><a href="${pageContext.request.contextPath}/especie/delete?especie.pkCodigo=${item.pkCodigo}" class="button">Excluir</a></td>
								
							</tr>
						</c:forEach>						
					</tbody>
					</table><br/>				
					
				<div class="form_row">					
					<button onclick="javascript:window.location = '${pageContext.request.contextPath}/especie/incluir'" class="button">Incluir</button>
				</div>
		</div>
	</jsp:body>
</t:template>